package com.wing.qualityTesting.model.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wing.qualityTesting.model.entity.ProcessQualityCategory;

/**
 * 质量参数分类VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class ProcessQualityCategoryVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 父ID
     */
    private Long parentId;

    /**
     * 名称
     */
    private String name;

    /**
     * 是否终极分类
     */
    private Boolean isFinal;

    /**
     * 排序
     */
    private Integer sortNumber;

    /**
     * 是否有子节点，0：无子节点，1：有子节点
     */
    private Boolean hasChild;

    /**
     * 是否子节点有启用，0：无，1；有
     */
    private Boolean hasEnableChild;

    /**
     * 数据来源
     */
    private ProcessQualityCategory.DataSourceType dataSourceType;

    /**
    * 数据来源描述
    */
    @TableField(exist = false)
    private String dataSourceTypeDesc;

    public String getDataSourceTypeDesc() {
        return dataSourceType.getDesc();
    }

    /**
     * 平台数据ID
     */
    private Long idPlatform;

    /**
     * 设备类型
     */
    private Long productType;

    private String productTypeName;
    @JsonProperty(value = "isDeleted")
    private Boolean isDeleted;

    public Boolean getIsDeleted(){
        return isDeleted;
    }

    public void setIsDeleted(Boolean isDeleted){
        this.isDeleted = isDeleted;
    }

}
